package router

import (
	"gin-vue-admin/api/v1"
	"gin-vue-admin/api/view_api"
	"gin-vue-admin/middleware"
	"github.com/gin-gonic/gin"
)

func InitUserIndexRouter(Router *gin.RouterGroup) {
	UserIndexRouter := Router.Group("userIndex").Use(middleware.OperationRecord())
	{
		UserIndexRouter.POST("createUserIndex", v1.CreateUserIndex)   // 新建UserIndex
		UserIndexRouter.DELETE("deleteUserIndex", v1.DeleteUserIndex) // 删除UserIndex
		UserIndexRouter.DELETE("deleteUserIndexByIds", v1.DeleteUserIndexByIds) // 批量删除UserIndex
		UserIndexRouter.PUT("updateUserIndex", v1.UpdateUserIndex)    // 更新UserIndex
		UserIndexRouter.GET("findUserIndex", v1.FindUserIndex)        // 根据ID获取UserIndex
		UserIndexRouter.GET("getUserIndexList", v1.GetUserIndexList)  // 获取UserIndex列表
	}
}


func InitUserIndexPublic (Router *gin.RouterGroup){
	UserIndexRouter := Router.Group("view_api/user_index")
	UserIndexRouter.GET(`userIndex`,view_api.GetUserIndex)
	UserIndexRouter.POST(`addIndex`,view_api.AddUserIndex)
	UserIndexRouter.POST(`updateIndex`,view_api.UpdateUserIndex)
}